<?php

namespace app\common\model;

use think\Model;

class Feedback extends Model
{
    protected $table = 'feedback';

    public static function createItem($data)
    {
        $data['add_time'] = now();
        $model = new self();
        return $model->allowField(true)->save($data);
//        self::insert([
//            'name' => $name,
//            'phone' => $phone,
//            'email' => $email,
//            'remark' => $remark,
//            'product_id' => $product_id,
//            'product_name' => $name,
//            'add_time' => now()
//        ]);
    }
}